package com.shushan.mixedexam.readrecite.bean;

import com.android.net.bean.NetBaseBean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: ReadReciteTotalDataBean
 * @Desciption: //朗读背诵总数据bean
 * @author: zhangshihao
 * @date: 2018-06-25
 */
public class ReadReciteTotalDataBean extends NetBaseBean {

    private List<ReadReciteDataBean> rrDataBeanList = new ArrayList<>();

    @Override
    public void initByJson(JSONObject jsonObject) throws JSONException {
        JSONArray jsonArray = jsonObject.optJSONArray("data");
        if(jsonArray != null && jsonArray.length() > 0){
            for(int i=0;i<jsonArray.length();i++){
                JSONObject jobj = jsonArray.optJSONObject(i);
                ReadReciteDataBean rrDataBean = new ReadReciteDataBean();
                rrDataBean.initByJson(jobj);
                rrDataBeanList.add(rrDataBean);

            }
        }
    }

    public List<ReadReciteDataBean> getRrDataBeanList() {
        return rrDataBeanList;
    }

}
